#ifndef REPORT_H
#define REPORT_H

#include <QThread>
#include <QSqlDatabase>
#include <QSqlQueryModel>
#include <QSqlError>
#include <QTime>
#include <QProcess>
#include "smtp.h"

class Report : public QThread
{
    Q_OBJECT
public:
    explicit Report(QObject *parent = 0, QSqlDatabase *db = 0);
    void run();
    void doExcel();

    //Add by killerlife
    void doExcelEx();
    //=================

    volatile bool stopped;
signals:
    void log_info(QString msg);
    void send_message(const QString msg);
public slots:
    void mailSent(QString msg);

private:
    QSqlDatabase db;
    QSqlQueryModel *model;
    QString sql ;
    QStringList theaterNoList;
    QTime test_time;
    QString from;
    QString to;
    QString subject;
    Smtp *smtp;
    QString user;
    QString passwd;
    QString host;
    int port;




};

#endif // REPORT_H
